<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\captcha\Captcha;
$this->title = '用户登录';
$this->params['breadcrumbs'][] = $this->title;

?>

<section class="formbox">
	   <form action="<?= yii\helpers\Url::to(['auth/login']);?>" id="subform" method='post'>
		   <input name="_csrf" type="hidden" id="_csrf" value="<?= Yii::$app->request->csrfToken ?>">
		   <p style="font-size: 0.3rem;">
			   <a style="color:red;">
				   <?php
				   if(\Yii::$app->getSession()->getFlash("error"))
				   {
					   echo \Yii::$app->getSession()->getFlash("error");
				   }
				   ?>
			   </a>
		   </p>
	            <div class="textline">

	            	<ul>
	            		<li><img src="/img/ldico1.png" /> <input type="text" id="user" name="LoginForm[username]" value="" placeholder="用户名/手机号/邮箱"/></li>
	            		<li><img src="/img/ldico2.png" /> <input type="password" id="pasw" name="LoginForm[password]" value="" placeholder="请输入密码"/></li>
	            	</ul>

	            </div>

	            <div class="submitbtn"><input id="subb" type="submit" name="" value="立即登录"/></div>

	            <div class="subbot">
	            	<a href="/auth/partone"><span class="subbotle">忘记密码？</span></a>
	            	<a href="/auth/signup"><span class="subbotrg">现在去注册</span></a>
	            </div>
	   </form>
</section>


<script>
	$(document).ready(function() {
		$("#subb").click(function(){
			var User = $("#user").val();
			var Pasw = $("#pasw").val();
			if(User==""){
				alert("请填写正确的账号！");
				return false;
			}

			if(Pasw==""){
				alert("请填写正确的密码！");
				return false;
			}
		})

	});
</script>
		


